home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 2: CDPD 1
/
Almathera Ten on Ten - Disc 2: CDPD 1.iso
/
pd
/
201-225
/
224
/
xebec
/
paul.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-13
|
3KB
|
81 lines
/******** The following declarations are used in most every program
written by Paul Kienitz. Generally, I use a symbol table file
which includes exec/exec.h, libraries/dosextens.h, functions.h,
and this. I have a separate symbol file for intuition.
********/
#include <stdio.h>
#define put(S) fputs(S, stdout)
#define null 0L
/* uppercase is a pain in the wazoo */
#define bip(T, B) ((T *) (B << 2))
#define gbip(B) bip(void, B)
/* B is expected to be of type BPTR or BSTR. In my version of <functions.h>,
all functions that are declared as returning struct FileHandle * or struct
Lock * (a nonexistent type; it's FileLock) or struct Segment * are changed to
return type BPTR. Also, CreateProc and DeviceProc are corrected to return
struct MsgPort * instead of Process, which is in error. */
/* Ain't BPTR's dumb?? Wasn't it silly to use BCPL??
Further evidence, alongside George Michael, Margaret Thatcher, the National
Front, Dr. Who, Boy George, Sting, Reg Mellor "the King of Ferret Legging",
the Royal Family, the rise and collapse of Colonialism, and every piece of
software ever written by MetaCompGrow, that the English are weenies.
*/
#define Alloc(S) AllocMem((long) S, 0L)
#define AllocP(S) AllocMem((long) S, MEMF_PUBLIC)
#define AllocZ(S) AllocMem((long) S, MEMF_CLEAR)
#define AllocCP(S) AllocMem((long) S, MEMF_CHIP | MEMF_PUBLIC)
#define AllocPZ(S) AllocMem((long) S, MEMF_PUBLIC | MEMF_CLEAR)
#define AllocCPZ(S) AllocMem((long) S, MEMF_CHIP | MEMF_PUBLIC | MEMF_CLEAR)
#define NewR(T, R) (T *) AllocMem((long) sizeof(T), R)
#define New(T) NewR(T, 0L)
#define NewP(T) NewR(T, MEMF_PUBLIC)
#define NewZ(T) NewR(T, MEMF_CLEAR)
#define NewCP(T) NewR(T, MEMF_CHIP | MEMF_PUBLIC)
#define NewPZ(T) NewR(T, MEMF_PUBLIC | MEMF_CLEAR)
#define NewCPZ(T) NewR(T, MEMF_CHIP | MEMF_PUBLIC | MEMF_CLEAR)
/* use P for most things with a Node in them, CP for IO/sound/graphics
data (like for an IORequest's io_Data), Z whenever you want. We don't
provide for non-public chip allocation. */
#define Free(T, A) FreeMem(A, (long) sizeof(T))
#define RLock(F) Lock(F, ACCESS_READ)
#define WLock(F) Lock(F, ACCESS_WRITE)
#define OOpen(F) Open(F, MODE_OLDFILE)
#define NOpen(F) Open(F, MODE_NEWFILE)
typedef short bool;
#define false 0
#define true 1
typedef unsigned short ushort;
typedef unsigned long ulong;
typedef unsigned char ubyte;
typedef void *adr;
typedef char *str;
typedef str *stray;
#define bit(B) (1L << (B))
#define private static
#define import extern
#define PUBLIC
/*
In case you have never done landscaping in the East Bay, I will explain that
"Compgrow" is a compost/mulch product sold by the East Bay Municipal Utilities
District, which is made from a mixture of sawdust and raw sewage. Easterners
may know of a similar product called "Milorganite". Most commercial over-
priced potting mix & soil conditioner sold in plastic bags is based on it.
*/